<template>
  <div class="v-model">
    <h1>父组件</h1>
    <input @input="inputHandle" />
    <VmodelCom v-model="value" />
		{{componentSetting}}
  </div>
</template>

<script>
import VmodelCom from "./VmodelCom";
import dynamicStatesFormat from "./detailSetting";

export default {
  components: {
    VmodelCom
  },
  data() {
    return {
      value: ""
    };
  },
  computed: {
    componentSetting(vm) {
      console.log("computed");
      return dynamicStatesFormat(vm).get("姓名");
    }
  },
  methods: {
    inputHandle(v) {
      this.value = v.target.value;
    }
  }
};
</script>

<style lang="less">
.v-model {
  .pllugin-name {
    font-weight: 700;
  }
  .pllugin-explain {
    padding: 10px 0;
  }
}
</style>